package com.weidft.web.wd.controller;

import java.io.IOException;

import javax.servlet.ServletOutputStream;

import com.alibaba.roma.web.servlet.result.mime.JsonResult;

public class JobNoAutoSuggest extends JsonResult{  
  public JobNoAutoSuggest(Basic basic,String query,String firstDB,String secondDB)
  {
    this(basic,query,firstDB,secondDB,20);    
  }
  
  public JobNoAutoSuggest(Basic basic,String query,String firstDB,String secondDB,int length)
  {
    this.basic=basic;
    this.firstDB=firstDB;
    this.secondDB=secondDB;
    this.query=query;
    this.length=length;    
  }
  protected void onSerialize(ServletOutputStream outputStream) throws IOException {
      String s = basic.getJobNoAutoSuggest(query,firstDB,secondDB,length);
      byte[] data = s.getBytes();
      outputStream.write(data);
  }
  private Basic basic;
  private String firstDB;
  private String secondDB;
  private int length;
  private String query;
}
